﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FormApp0302
{
    public partial class Form1 : Form
    {

        //通过代码的方式添加事件
        public Form1()
        {
            InitializeComponent();
            //为 push_button 控件的 Click 事件添加了一个事件处理程序 OnTest
            push_button.Click += new EventHandler(this.OnTest);
        
        }


        private void OnTest(object sender, EventArgs e)
        {
            //弹出一个消息框
            MessageBox.Show("林斩令");
        }
    }
}
